import axios from '@/libs/request/axios'
// 保存贴息方案配置
export const saveOrUpdateConfig = (params) => {
    return axios.request({
        url: `/product/productDiscountConfig/saveOrUpdateConfig`,
        params: params,
        method: 'post'
    })
}
// 保存贴息补贴方信息
export const saveSubsidy = (params) => {
    return axios.request({
        url: `/product/productDiscountConfig/saveSubsidy`,
        params: params,
        method: 'post'
    })
}
// 分页获取贴息方案配置
export const getDiscountConfigData = (params) => {
    return axios.request({
        url: '/product/productDiscountConfig/getDiscountConfigData',
        data: params,
        method: 'post'
    })
}
// 上移贴息方案配置
export const upConfig = (params) => {
    return axios.request({
        url: '/product/productDiscountConfig/upConfig',
        params: params,
        method: 'post'
    })
}
// 下移贴息方案配置
export const downConfig = (params) => {
    return axios.request({
        url: '/product/productDiscountConfig/downConfig',
        params: params,
        method: 'post'
    })
}
// 删除贴息方案配置
export const delById = (id, params) => {
    return axios.request({
        url: `/product/productDiscountConfig/delById/${id}`,
        data: params,
        method: 'delete'
    })
}
// 获取贴息方案规则信息
export const getSelectDiscountRuleData = (params) => {
    return axios.request({
        url: '/product/productDiscountConfig/getSelectDiscountRuleData',
        data: params,
        method: 'post'
    })
}
// 保存贴息方案配置
export const saveOrUpdateConfigByType = (params) => {
    return axios.request({
        url: `/product/productDiscountConfig/saveOrUpdateConfigByType`,
        data: params,
        method: 'post'
    })
}
// 根据方案ID查询补贴方列表
export const getDiscountConfigDataByPlanID = (id, params) => {
    return axios.request({
        url: `/product/productDiscountConfig/getDiscountConfigDataByPlanID/${id}`,
        data: params,
        method: 'post'
    })
}
